<?php use_helper('Javascript') ?>
<h2>
        <?php 	switch($accion):
					case 'edit':
						echo "Editar Deudor: Buscar";
						break;
					case 'show':
						echo "Ver Deudor: Buscar";
						break;
					default:
						echo "Buscar Deudor";
						break;;
				endswitch;
        ?>
</h2>
<div id="form_search_deudor">
<?php echo form_remote_tag(array(
    'update'   	=> 'list-search-deudor',
    'url'      	=> 'administracion/searchdeudorupdate',
	'loading'	=> visual_effect('appear','loading'),
	'complete'	=> visual_effect('appear','list-search-deudor').
					visual_effect('highlight','list-search-deudor',array('duration' => 1.0)).
					visual_effect('fade','loading'),
))?>
  <table>
    <tfoot>
      	<tr>
      		<td colspan="2">
      			<?php echo link_to_remote('Cancelar', array(
          				'update'	=> 'modulo',
          				'url'		=> 'administracion/indexdeudor',
          				'loading'	=> visual_effect('appear','loading', array('duration' => 0)),
						'complete'	=> visual_effect('fade','loading', array('duration' => 0)), )); ?>
        		<input type="submit" value="Buscar"/>
      		</td>
    	</tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><label for="deudor_rut_deudor">Rut</label></th>
        <td>
          <?php echo $form['rut_deudor']->renderError() ?>
          <?php echo $form['rut_deudor'] ?>
        </td>
      </tr>
      <tr>
        <th><label for="deudor_nombres">Nombres</label></th>
        <td>
          <?php echo $form['nombres']->renderError() ?>
          <?php echo $form['nombres'] ?>
        </td>
      </tr>
      <tr>
        <th><label for="deudor_apellido_paterno">Apellido Paterno</label></th>
        <td>
          <?php echo $form['apellido_paterno']->renderError() ?>
          <?php echo $form['apellido_paterno'] ?>
        </td>
        <th><label for="deudor_apellido_materno">Apellido Materno</label></th>
        <td>
          <?php echo $form['apellido_materno']->renderError() ?>
          <?php echo $form['apellido_materno'] ?>
        </td>
      </tr>
      <tr>
        <th><label for="deudor_celular">Tel&eacute;fono Celular</label></th>
        <td>
          <?php echo $form['celular']->renderError() ?>
          <?php echo $form['celular'] ?>
        </td>
        <th><label for="deudor_email">Email</label></th>
        <td>
          <?php echo $form['email']->renderError() ?>
          <?php echo $form['email'] ?>
		  <?php echo $form['accion'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>
</div>
<div id="list-search-deudor" class="pop-up" style="display:none"></div>